import { createApp } from 'vue'
import App from './App.vue'
import router from './router';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//挂载相关的插件
import plugins from './components/formDesigner/index';
const app = createApp(App)

// 注册所有Element Plus图标
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   app.component(key, component)
// }

// 挂载 router
app.use(router);
app.use(ElementPlus)
app.use(plugins)
app.mount('#app')

app.config.errorHandler = (err: any, _instance: any, _info: any) => {
  console.error(err);
};